﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;

namespace Mrsoft.Controls
{
    class NativeMethods
    {
        #region API
        [DllImport("user32.dll")]
        internal static extern bool ReleaseCapture();
        [DllImport("user32.dll")]
        internal static extern IntPtr SendMessage(IntPtr hwnd, Int32 wMsg, IntPtr wParam, IntPtr lParam); 
        #endregion

        #region 对外接口_M标记为自己写的对外函数
        [SecuritySafeCriticalAttribute]
        public  static bool ReleaseCaptureM()
        {
            bool bResult = ReleaseCapture();
            return bResult;
        }
        [SecuritySafeCriticalAttribute]
        public static bool SendMessageM(IntPtr hwnd, int wMsg, int wParam, int lParam)
        {
            SendMessage(hwnd, wMsg, (IntPtr)wParam, (IntPtr)lParam);
            return true;
        } 
        #endregion
    }

}
